let includes = ([
    "include/common.js",
]);

function create(ob) {
    return ob;
}

function testMe() {

    let user = os.create("clone/user.js");
    user.set("account", "哈哈哈");
    os.debug(user.get("account"));

    let user2 = os.create("clone/user.js");
    user2.set("account", "嘻嘻洗洗爱");
    os.debug(user2.get("account"));
    os.debug(user.get("account"), "再次打印属性");
}


let battle;

function testCombat() {


    if (!battle) {

        battle = os.create("clone/roundBattle.js");

        let usr = os.create("clone/user.js");

        let usr2 = os.create("clone/user.js");
        os.debug(usr);
        usr.set("asdasd", 1);
        os.debug(usr);
        usr.set("hp",100);
        usr.set("attack",20);
        usr.set("defense",10);
        usr2.set("hp",100);
        usr2.set("attack",30);
        usr2.set("defense",10);
        //
        battle.addKills("kill1",[usr]);
        battle.addKills("kill2",[usr2]);
        return {};
    }

     battle.heartbeat();

}

//程序入口......
//FarOS循环调用main方法....
function main() {
    let me = thisObject();
    me.testCombat();
    return {};
}

